{include file='common/head'}
<!--员工发布&#45;&#45;说天喊地-->
<div style="overflow-x: hidden;width: 96%;margin: auto;padding-top: 1rem;">
    <blockquote class="layui-elem-quote layui-text">

    </blockquote>
    <!--<form action="{:url('Test/test')}" enctype="multipart/form-data" id="upForm" method="post">-->
        身份证号:<input type="text" name="idcard"><br>
        省份:<input type="text" name="province_id"><br>
        城市:<input type="text" name="city_id"><br>
        区域:<input type="text" name="area_id"><br>
        详细地址:<input type="text" name="address"><br>
        身份证正面照:<input type="file" name="img1"><br>
        营业执照:<input type="file" name="img2"><br>
        <button type="submit" class="send">提交</button>
    <!--</form>-->
    {include file='common/footer'}
    <!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->

    <script src="/static/admin/jquery.js"></script>
    <script type="text/javascript" src="/static/index/layer/layer.js"></script>
    <script>
        //js代码

        $('.send').click(function(event) {
            //formdata储存异步上传数据
            var formData = new FormData($('form')[0]);
            formData.append('file',$(':file')[0].files[0]);
            console.log(formData)
            //坑点: 无论怎么传数据,console.log(formData)都会显示为空,但其实值是存在的,f12查看Net tab可以看到数据被上传了
            $.ajax({
                url:'http://dfhbo2o.com/admin/Test/test',
                type: 'POST',
                data: formData,
                //这两个设置项必填
                contentType: false,
                processData: false,
                success:function(data){
                    console.log(data)

                }
            })
        });
    </script>
    </body>
    </html>